package com.crazymakercircle.imServer.server;

import lombok.Data;

import java.util.HashSet;
import java.util.Set;

/**
 * create by 尼恩 @ 疯狂创客圈
 **/
@Data
public class UserSessions {

    private String userId;
    private Set<String> sessionIds = new HashSet<>(10);

    public UserSessions(String userId) {
        this.userId = userId;
    }


    public void addSessionId(String sessionId) {

        sessionIds.add(sessionId);
    }

    public void removeSessionId(String sessionId) {

        sessionIds.remove(sessionId);
    }


}
